package com.todo.sight.application.iface.frontend.request;

import com.todo.common.common.entity.CurrentUser;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author azhebuxing
 * @date 2024/5/8 18:39
 * @description
 */
@Data
@Schema(name = "上报POI入参", description = "上报POI入参")
public class ReportSightPoiByUserParam {

    private CurrentUser _user;

    @NotNull
    @Schema(title = "名称", description = "名称")
    private String name;

    @NotNull
    @Schema(title = "省份", description = "省份")
    private String province;

    @Schema(title = "城市", description = "城市")
    private String city;

    @Schema(title = "区县", description = "区县")
    private String district;

    @Schema(title = "乡镇", description = "乡镇")
    private String town;

    @Schema(title = "具体地址", description = "具体地址")
    private String address;

    @NotNull
    @Schema(title = "poi类型", description = "poi类型")
    private Integer poiType;

    @Schema(title = "类型列表", description = "类型列表")
    private List<String> typeList;

    @NotNull
    @Schema(title = "经度", description = "经度")
    private BigDecimal lon;

    @NotNull
    @Schema(title = "纬度", description = "纬度")
    private BigDecimal lat;

    @Schema(title = "评分", description = "评分")
    private Integer rating;

    @Schema(title = "开放时间", description = "开放时间")
    private String openTime;

    @Schema(title = "上报原因", description = "上报原因")
    private String reportReason;


    public boolean baseCheck() {
        if (name == null ||province == null||  address == null || lon == null || lat == null || reportReason == null){
            return false;
        }
        return true;
    }
}
